<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.js"></script>
</head>
<body>
<div id="app">

<!--  1.对象-->
    <div :style="obj1">对象1</div>
    <div :style="{background:'red',color:'white'}">对象2</div>
    <hr>
<!--  2.数组-->
    <div :style="[obj1,obj2]">数组1</div>
    <div :style="arr">数组2</div>
</div>
<script>
    Vue.config.productionTip = false
    const vm = new Vue({
        el: '#app',
        data() {
            return {
              obj1:{
                  color:'red',
                  border:'1px solid green'
              },
                obj2:{
                  width:'200px',
                    height:'200px'
                },
                obj3:{
                  backgroundColor:'hotpink'
                },
                arr:[{color:'orange'},{background:'Pink'}]
            }
        }
    })
</script>
</body>
</html>